include ../Makefile.inc

MONITOR_OBJS = \
	linux_bt_rfkill.c.o \
	capture_linux_bluetooth.c.o
MONITOR_BIN = kismet_cap_linux_bluetooth

all: $(MONITOR_BIN)

$(MONITOR_BIN):	$(MONITOR_OBJS) $(patsubst %c.o,%c.d,$(MONITOR_OBJS)) ../libkismetdatasource.a
		$(CCLD) $(LDFLAGS) -o $(MONITOR_BIN) $(MONITOR_OBJS) ../libkismetdatasource.a $(DATASOURCE_LIBS)

clean:
	@-rm -f $(MONITOR_BIN)
	@-rm -f *.o
	@-rm -f *.d
	@-rm -f gdbus/*.o
	@-rm -f gdbus/*.d

%.c.o:	%.c
%.c.o : %.c %.c.d
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $*.c -o $@

%.c.d:	%.c
	$(CC) -MM $(CFLAGS) $(CPPFLAGS) $*.c | sed -e "s/\.o/\.c.o/" > $*.c.d

.PRECIOUS: %.c.d

include $(wildcard $(patsubst %c.o,%c.d,$(MONITOR_OBJS)))

